FIND_PATH(SDLIMAGE_INCLUDE_DIR SDL_image.h /usr/include /usr/local/include /usr/local/include/SDL /usr/include/SDL)

FIND_LIBRARY(SDLIMAGE_LIBRARIES NAMES SDL_image PATH /usr/lib /usr/local/lib) 

IF (SDLIMAGE_INCLUDE_DIR AND SDLIMAGE_LIBRARIES)
   SET(SDLIMAGE_FOUND TRUE)
ENDIF (SDLIMAGE_INCLUDE_DIR AND SDLIMAGE_LIBRARIES)


IF (SDLIMAGE_FOUND)
   IF (NOT SDLIMAGE_FIND_QUIETLY)
      MESSAGE(STATUS "Found sdl_image: ${SDLIMAGE_LIBRARY}")
   ENDIF (NOT SDLIMAGE_FIND_QUIETLY)
ELSE (SDLIMAGE_FOUND)
   IF (SDLIMAGE_FIND_REQUIRED)
      MESSAGE(FATAL_ERROR "Could not find sdl_image")
   ENDIF (SDLIMAGE_FIND_REQUIRED)
ENDIF (SDLIMAGE_FOUND)

